<?php
/**
 * @return
 * @author 朱乐斌
 * @date
 */

namespace app\api\controller;

use app\api\model\BottomNavModel;
use app\BaseController;

class BottomNav extends BaseController
{

    /**
     *  获取底部导航列表
     */
    public function bottomList(): \think\response\Json
    {
        try {
            $data = BottomNavModel::where('status', 1)->select();
            if ($data) {
                return json(['msg' => '成功', 'code' => 200, 'data' => $data]);
            } else {
                return json('暂无数据', 400);
            }
        } catch (\Exception $e) {
            return json($e->getMessage());
        }
    }

}